Optimal. Leaf size=82 \[ -\frac {B d-A e}{e (b d-a e) (d+e x)}+\frac {(A b-a B) \log (a+b x)}{(b d-a e)^2}-\frac {(A b-a B) \log (d+e x)}{(b d-a e)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 1, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.050, Rules used = {78}
\begin {gather*} -\frac {B d-A e}{e (d+e x) (b d-a e)}+\frac {(A b-a B) \log (a+b x)}{(b d-a e)^2}-\frac {(A b-a B) \log (d+e x)}{(b d-a e)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 78
Rubi steps
\begin {align*} \int \frac {A+B x}{(a+b x) (d+e x)^2} \, dx &=\int \left (\frac {b (A b-a B)}{(b d-a e)^2 (a+b x)}+\frac {B d-A e}{(b d-a e) (d+e x)^2}+\frac {(-A b+a B) e}{(b d-a e)^2 (d+e x)}\right ) \, dx\\ &=-\frac {B d-A e}{e (b d-a e) (d+e x)}+\frac {(A b-a B) \log (a+b x)}{(b d-a e)^2}-\frac {(A b-a B) \log (d+e x)}{(b d-a e)^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 80, normalized size = 0.98 \begin {gather*} \frac {B d-A e}{e (-b d+a e) (d+e x)}+\frac {(A b-a B) \log (a+b x)}{(b d-a e)^2}+\frac {(-A b+a B) \log (d+e x)}{(b d-a e)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.11, size = 83, normalized size = 1.01
method | result | size |
default | \(\frac {\left (A b -B a \right ) \ln \left (b x +a \right )}{\left (a e -b d \right )^{2}}-\frac {A e -B d}{\left (a e -b d \right ) e \left (e x +d \right )}-\frac {\left (A b -B a \right ) \ln \left (e x +d \right )}{\left (a e -b d \right )^{2}}\) | \(83\) |
norman | \(\frac {\left (A e -B d \right ) x}{d \left (a e -b d \right ) \left (e x +d \right )}+\frac {\left (A b -B a \right ) \ln \left (b x +a \right )}{a^{2} e^{2}-2 a b d e +b^{2} d^{2}}-\frac {\left (A b -B a \right ) \ln \left (e x +d \right )}{a^{2} e^{2}-2 a b d e +b^{2} d^{2}}\) | \(109\) |
risch | \(-\frac {A}{\left (a e -b d \right ) \left (e x +d \right )}+\frac {B d}{\left (a e -b d \right ) e \left (e x +d \right )}+\frac {\ln \left (-b x -a \right ) A b}{a^{2} e^{2}-2 a b d e +b^{2} d^{2}}-\frac {\ln \left (-b x -a \right ) B a}{a^{2} e^{2}-2 a b d e +b^{2} d^{2}}-\frac {\ln \left (e x +d \right ) A b}{a^{2} e^{2}-2 a b d e +b^{2} d^{2}}+\frac {\ln \left (e x +d \right ) B a}{a^{2} e^{2}-2 a b d e +b^{2} d^{2}}\) | \(181\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.30, size = 119, normalized size = 1.45 \begin {gather*} -\frac {{\left (B a - A b\right )} \log \left (b x + a\right )}{b^{2} d^{2} - 2 \, a b d e + a^{2} e^{2}} + \frac {{\left (B a - A b\right )} \log \left (x e + d\right )}{b^{2} d^{2} - 2 \, a b d e + a^{2} e^{2}} - \frac {B d - A e}{b d^{2} e - a d e^{2} + {\left (b d e^{2} - a e^{3}\right )} x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.98, size = 147, normalized size = 1.79 \begin {gather*} -\frac {B b d^{2} + A a e^{2} - {\left (B a + A b\right )} d e + {\left ({\left (B a - A b\right )} x e^{2} + {\left (B a - A b\right )} d e\right )} \log \left (b x + a\right ) - {\left ({\left (B a - A b\right )} x e^{2} + {\left (B a - A b\right )} d e\right )} \log \left (x e + d\right )}{b^{2} d^{3} e + a^{2} x e^{4} - {\left (2 \, a b d x - a^{2} d\right )} e^{3} + {\left (b^{2} d^{2} x - 2 \, a b d^{2}\right )} e^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 355 vs.
\(2 (63) = 126\).
time = 0.76, size = 355, normalized size = 4.33 \begin {gather*} \frac {\left (- A b + B a\right ) \log {\left (x + \frac {- A a b e - A b^{2} d + B a^{2} e + B a b d - \frac {a^{3} e^{3} \left (- A b + B a\right )}{\left (a e - b d\right )^{2}} + \frac {3 a^{2} b d e^{2} \left (- A b + B a\right )}{\left (a e - b d\right )^{2}} - \frac {3 a b^{2} d^{2} e \left (- A b + B a\right )}{\left (a e - b d\right )^{2}} + \frac {b^{3} d^{3} \left (- A b + B a\right )}{\left (a e - b d\right )^{2}}}{- 2 A b^{2} e + 2 B a b e} \right )}}{\left (a e - b d\right )^{2}} - \frac {\left (- A b + B a\right ) \log {\left (x + \frac {- A a b e - A b^{2} d + B a^{2} e + B a b d + \frac {a^{3} e^{3} \left (- A b + B a\right )}{\left (a e - b d\right )^{2}} - \frac {3 a^{2} b d e^{2} \left (- A b + B a\right )}{\left (a e - b d\right )^{2}} + \frac {3 a b^{2} d^{2} e \left (- A b + B a\right )}{\left (a e - b d\right )^{2}} - \frac {b^{3} d^{3} \left (- A b + B a\right )}{\left (a e - b d\right )^{2}}}{- 2 A b^{2} e + 2 B a b e} \right )}}{\left (a e - b d\right )^{2}} + \frac {- A e + B d}{a d e^{2} - b d^{2} e + x \left (a e^{3} - b d e^{2}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 2.38, size = 108, normalized size = 1.32 \begin {gather*} -\frac {{\left (B a e - A b e\right )} \log \left ({\left | b - \frac {b d}{x e + d} + \frac {a e}{x e + d} \right |}\right )}{b^{2} d^{2} e - 2 \, a b d e^{2} + a^{2} e^{3}} - \frac {\frac {B d}{x e + d} - \frac {A e}{x e + d}}{b d e - a e^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.19, size = 95, normalized size = 1.16 \begin {gather*} \frac {2\,\mathrm {atanh}\left (\frac {a^2\,e^2-b^2\,d^2}{{\left (a\,e-b\,d\right )}^2}+\frac {2\,b\,e\,x}{a\,e-b\,d}\right )\,\left (A\,b-B\,a\right )}{{\left (a\,e-b\,d\right )}^2}-\frac {A\,e-B\,d}{e\,\left (a\,e-b\,d\right )\,\left (d+e\,x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________